package events 
{
	import flash.events.Event;
	import model.macro.World;
	
	/**
	 */
	public class WorldEvent extends Event 
	{
		public static const TURN_END:String = "turnEnd";
		public static const TURN_BEGIN:String = "turnBegin";
		public static const CHANGE_GOLD:String = "changeGold";
		public static const TERRITORY_SELECTED:String = "territorySelected";
		static public const TERRITORY_RIGHT_CLICKED:String = "territoryRightClicked";
		public static const UNIT_SELECTED:String = "unitSelected";
		static public const ALL_UNITS_DESELECTED:String = "allUnitsDeselected";
		static public const UNIT_DESELECTED:String = "unitDeselected";		
		static public const UNITS_MOVED:String = "unitsMoved";
		static public const BATTLE_BEGIN:String = "battleBegin";
		
		private var _world:World;
		private var _data:Object;
		
		public function WorldEvent(type:String, world:World, data:Object = null)
		{
			super(type, true);
			_data = data;
			_world = world;
			
		}
		
		public function get world():World 
		{
			return _world;
		}
		
		public function get data():Object 
		{
			return _data;
		}
		
		override public function clone():Event 
		{
			return new WorldEvent(type, world, data);
		}
		
	}

}